package com.heima.pro_system;

import java.util.ArrayList;

public class Mall {
    private ArrayList<Product> list;

    public Mall(ArrayList<Product> list) {
        this.list = list;
    }
    public void addProduct(Product product){
        list.add(product);
    }
    public void displayProductInfo(){
        for (int i = 0; i < list.size(); i++) {
            Product p = list.get(i);
            p.displayInfo();
            p.calculateDiscount();
        }
    }


}
